
<div class="form">
	<p></p>
	<form id="ndk-health-form" method="post" action="<?php echo Yii::app()->createUrl('/finance/showrugilaba'); ?>" target="_blank">
		<div class="row">
			<div class="col-md-4">
				<div class="widget box">
					<div class="widget-header">
						<h4><i class="icon-reorder"></i> Report Rugi Laba </h4>
					</div>
					<div class="widget-content">
						
						<div class="control-group">
						<label class="control-label">Bulan</label>
						<div class="controls">
						<select id="bulan_bank" name="bulan_bank" class="form-control">
						<option value="01">Januari</option>
						<option value="02">Februari</option>
						<option value="03">Maret</option>
						<option value="04">April</option>
						<option value="05">Mei</option>
						<option value="06">Juni</option>
						<option value="07">Juli</option>
						<option value="08">Agustus</option>
						<option value="09">September</option>
						<option value="10">Oktober</option>
						<option value="11">November</option>
						<option value="12">Desember</option>
						</select>
						</div>
						</div>
						

						<div class="control-group">
						<label class="control-label">Tahun</label>
						<div class="controls">
						<input id="tahun_bank" class="form-control" type="text" name="tahun_bank" size="100">
						</div>
						</div>
						
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-4">
				<div class="form-actions">
					<button class="btn btn-primary btn-large" id="btn_prev" type="button">Preview</button>
					<button class="btn btn-primary btn-large" name="yt0" type="submit">Cetak</button>
				</div>
			</div>
		</div>
	</form>
</div>
<div class="form">
<table class="table table-hover table-striped table-bordered table-highlight-head" id="tbl_rugilaba">
	<thead>
		<tr>
			<th></th>
			<th></th>
			<th colspan="2" style="text-align:center">Current Year</th>
			<th colspan="2" style="text-align:center">Last Year</th>
		</tr>
	</thead>
	<tbody>
	
	</tbody>
	
</div>

<script type="text/javascript">
$("#btn_prev").click(function(e){
$.ajax({
			type:"POST",
            url:"<?php echo Yii::app()->createUrl('/Finance/showRugilaba'); ?>",
			dataType:"json",
            success:function(data){
				$("#tbl_rugilaba tbody").html("<tr>"+
				"<td colspan='6'><b>Pendapatan</b></td>"+
				"</tr>"+
				"<tr>"+
				"<td>-</td>"+
				"<td>Pendapatan Jasa Keperantaraan</td>"+
				"<td>"+data.piutangjasakeperantaraan+"</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td>-</td>"+
				"<td>Pendapatan Jasa Lainnya</td>"+
				"<td>"+data.pendapatanjasalainnya+"</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td colspan='3'>Total Pendapatan Jasa</td>"+
				"<td>"+data.totalpendapatanjasa+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td>-</td>"+
				"<td>Hasil Investasi</td>"+
				"<td></td>"+
				"<td>"+data.hasilinvestasi+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td>-</td>"+
				"<td>Hasil Lainnya</td>"+
				"<td></td>"+
				"<td>"+data.hasillainnya+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<tr>"+
				"<td colspan='3' style='text-align:right'><b><i>JUMLAH PENDAPATAN<i></b></td>"+
				"<td>"+data.total+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td colspan='6'><b>Biaya</b></td>"+
				"</tr>"+
				"<tr>"+
				"<td><b>I</b></td>"+
				"<td colspan='5'>Biaya Operasional</td>"+
				"</tr>"+
				"<tr>"+
				"<td></td>"+
				"<td>1. Beban Pegawai dan Pengurus</td>"+
				"<td>"+data.biayapegawaidanpengurus+"</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td></td>"+
				"<td>2. Biaya Pemasaran</td>"+
				"<td>"+data.biayapemasaran+"</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td></td>"+
				"<td>3. Biaya Kendaraan</td>"+
				"<td>"+data.biayakendaraan+"</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td></td>"+
				"<td>4. Biaya Operasional Lainnya</td>"+
				"<td>"+data.biayaoperasional+"</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td></td>"+
				"<td>5. Biaya Penyusutan Aktiva Tetap</td>"+
				"<td>"+data.biayapenyusutanaktivatetap+"</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td></td>"+
				"<td>6. Biaya Amortisasi</td>"+
				"<td>"+data.biayaamortisasi+"</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td colspan='3' style='text-align:right'><b><i>Jumlah Biaya Operasional<i></b></td>"+
				"<td>"+data.total_biayaoperasional+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td><b>II</b></td>"+
				"<td colspan='5'>Biaya Non Operasional</td>"+
				"</tr>"+
				"<tr>"+
				"<td></td>"+
				"<td>1. Biaya Non Operasional</td>"+
				"<td>0</td>"+
				"<td></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td colspan='3' style='text-align:right'><b><i>Jumlah Biaya Non Operasional <i></b></td>"+
				"<td>"+data.total_biayanonoperasional+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td colspan='3' style='text-align:right'><b><i>TOTAL BIAYA <i></b></td>"+
				"<td>"+data.total_biaya+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td colspan='3' style='text-align:right'><b><i>Laba/Rugi Sebelum Pajak<i></b></td>"+
				"<td>"+data.lr_sebelumpajak+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td colspan='3' style='text-align:right'><b><i>Pajak Penghasilan<i></b></td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"+
				"<tr>"+
				"<td colspan='3' style='text-align:right'><b><i>Laba/Rugi Setelah Pajak<i></b></td>"+
				"<td>"+data.lr_setelahpajak+"</td>"+
				"<td>0</td>"+
				"<td>0</td>"+
				"</tr>"
				);
			}
			});
});
</script>